/*****************************************************************************************************
*       SRLOS Team
*@filename:     k_cp15.c
*@brief   :     this file defines some type and macros for cp15 using
*@author  :     bloceanc
*@note    :     we need some asm function codes
*@comment :
*@datetime:
*****************************************************************************************************/

#ifndef	_CP15_H_
#define	_CP15_H_

#define K_CP15_ASM_READ(__val__, __asm_code__)	\
{	\
	__asm__("STMFD R13!, {R0}\n\t"	\
	__asm_code__	\
	"STR R0, %0\n\t"				\
	"LDMFD R13!, {R0}\n\t"			\
	:"=m"(__val__));				\
}

#endif /* _CP15_H_ */
